home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bc-1_02.lha / bc-1.02 / Install < prev    next >
Text File  |  1991-11-24  |  4KB  |  108 lines

  1.  
  2. INSTALLATION
  3. ------------
  4.  
  5.   a) Make sure you have a working vsprintf and vfprintf in your library.
  6.      (If your system does not have them in your library, you can get
  7.       a copy of the BSD4.3-tahoe stdio that is freely copyable.  It
  8.       is available from uunet.uu.net.  For Minix systems, a vsprintf.c
  9.       is included.)
  10.  
  11.   b) EDIT the Makefile for the correct definitions.  Read the comments in
  12.      the the Makefile and make the changes needed.  (A "full" explanation
  13.      of all the C defines are given at the end of this file.)  If your are
  14.      on a MINIX machine, make sure the correct definitions for $O, $CFLAGS,
  15.      and $LDFLAGS are uncommented in the makefile.
  16.      NOTE: "configure" is a shell scritp that is automatically run by make
  17.      to configure the bc source to your operating system.  You should still
  18.      look at the Makefile.
  19.  
  20.   d) "make derived"  (If you need it.)
  21.      The distribution contains the files bc.c.dist y.tab.h.dist and
  22.      scan.c.dist.  These are provided so that you do not need a working 
  23.      yacc and flex (lex).  This program was designed to work with the free
  24.      programs byacc (berkeley yacc) and flex.  It should work with other
  25.      versions of yacc and lex, but it is not guaranteed to work.
  26.  
  27.      If you do not have yacc or flex, give the command to get the *.dist
  28.      files to their proper place.  This insures that make will not try
  29.      to make these derived files from their original source.  Use the
  30.      "make derived" before trying to compile bc.
  31.  
  32.   e) "make"
  33.     compiles bc
  34.  
  35.   f) "make install"
  36.     installs bc and libmath.b (if needed) in their directories.
  37.  
  38.   g) Use bc!
  39.  
  40.  
  41. DEFINES
  42. -------
  43.  
  44.   The following the are some defines that are automatically generated
  45.   by the configure script.  In most cases, you do not need to deal
  46.   with them.  The configure script is automatically run by make.
  47.  
  48.     BC_MATH_FILE=$(LIBFILE)
  49.      This defines the location of the math library file.  If you 
  50.      use this definition, the math library is read from LIBFILE.
  51.      If you do not define this, bc will include a "compiled" form
  52.      of the math library with the executable and will not need to
  53.      read any external file if the -l flag is given.
  54.  
  55.     VARARGS
  56.         The variable args mechanism is assumed to be ANSI stdarg.
  57.         Use -DVARARGS for Ultrix, SUN-OS, BSD, and other UNIX versions that
  58.         use traditional varargs,
  59.         For MINIX and ANSI compilers (gcc et al) do NOT use -DVARARGS.
  60.  
  61.     NO_LIMITS
  62.         Use this for systems without the /usr/include/limits.h file.
  63.         (BSD4.3 is one.) You should check the values of INT_MAX and 
  64.         LONG_MAX in the file const.h if you use -DNO_LIMITS.
  65.  
  66.     NO_UNISTD
  67.         Use this for systems without /usr/include/unistd.h.
  68.  
  69.     -DNO_STDLIB
  70.         Use this for systems without /usr/include/stdlib.h.
  71.  
  72.     STRINGS_H
  73.     Include the file <strings.h> instead of <string.h>.
  74.  
  75.  
  76.   The following defines may need to be added by hand to the Makefile if
  77.   you want them.  They are not generated by the configure script.
  78.  
  79.     -DOLD_EQ_OP
  80.      Causes bc to recognize =<op> as the same as <op>=.  The =<op> is
  81.         the old style.  It makes "a =- 1" ambiguous.  With OLD_EQ_OP defined
  82.         it is equivalent to "a -= 1" and with OLD_EQ_OP undefined it is
  83.         equivalent to "a = -1".
  84.  
  85.     -DSMALL_BUF
  86.         Use this IF you are using flex AND you have a systems with limited
  87.         memory space.  If you use this, you should also use -DBC_MATH_FILE.
  88.         This is "standard" for MINIX systems running on the IBM_PC.
  89.  
  90.     -DSHORTNAMES 
  91.     If your compiler keeps a limited number of characters from names,
  92.     you should include this define.  It is needed for the K&R compiler
  93.     on MINIX and is automatically added for MINIX on the IBM_PC.
  94.  
  95.     -DDEBUG=n
  96.      Compile the debugging code.  The higher the number, the more
  97.      debugging code.  The degugging code is not very good.
  98.  
  99.  
  100. POSSIBLE PROBLEMS
  101. -----------------
  102.  
  103.   There might be some possible problems compiling due to different
  104.   versions of the header files.  scan.c may require to edit out some
  105.   definitions of malloc and free.  Others should compile with the
  106.   correct set of defines.
  107.  
  108.